flavor 1
srclang 1
id 65535
numfuncs 5
entryfunc &main
LOC 2 6 6
func &test1 public used noinline (var %a u16 used) void
LOC 2 11 6
func &test2 public used noinline (var %a i32 used) void
LOC 2 16 6
func &test3 public used noinline (var %a i8 used) void
LOC 2 23 5
func &main public () i32
LOC 2 26 5
func &abort implicit public used noreturn extern () void
LOC 2 2 5
var $g1 i32 used
LOC 2 3 5
var $g2 i32 used
LOC 2 6 6
func &test1 public used noinline (var %a u16 used) void {
  funcid 1
  funcinfo {
    @INFO_fullname "test1"}


LOC 2 7 6
  dassign $g1 0 (cvt i32 u32 (dread u32 %a))
LOC 2 8
  return ()
}
LOC 2 11 6
func &test2 public used noinline (var %a i32 used) void {
  funcid 2
  funcinfo {
    @INFO_fullname "test2"}


LOC 2 12 6
  dassign $g2 0 (dread i32 %a)
LOC 2 13
  return ()
}
LOC 2 16 6
func &test3 public used noinline (var %a i8 used) void {
  funcid 3
  funcinfo {
    @INFO_fullname "test3"}


LOC 2 17 3
  if (eq u1 i32 (dread i32 $g1, constval i32 0)) {
LOC 2 18 5
    call &test1 (zext u32 16 (sext u16 8 (dread i32 %a)))
  }
LOC 2 20 3
  call &test2 (sext i32 8 (dread i32 %a))
LOC 2 21
  return ()
}
LOC 2 23 5
func &main public () i32 {
  funcid 4
  funcinfo {
    @INFO_fullname "main"}

  var %shortCircuit_5 i32 shortcc

LOC 2 24 3
  call &test3 (constval i8 -1)
LOC 2 25 10
  brtrue @shortCircuit_10 (ne u1 i32 (dread i32 $g1, constval i32 0xffff))
LOC 2 25 32
@shortCircuit_9 LOC 2 25 38
  brtrue @shortCircuit_10 (ne u1 i32 (dread i32 $g2, constval i32 -1))
  goto @shortCircuit_11
@shortCircuit_11   dassign %shortCircuit_5 0 (constval u32 0)
  goto @shortCircuit_12
@shortCircuit_10   dassign %shortCircuit_5 0 (constval u32 1)
@shortCircuit_12 LOC 2 25 3
  if (ne u1 i32 (dread i32 %shortCircuit_5, constval i32 0)) {
LOC 2 26 5
    call &abort ()
  }
LOC 2 28 3
  return (constval i32 0)
}
